﻿using RuoVea.OmiApi.Upload.Service;
using System.Threading.Tasks;

namespace Resume.Web.Controllers;

/// <summary>
/// 
/// </summary>
//[Authorize(Roles = "Admin,SuperAdmin")]
[Authorize]
public class AdminController : Controller
{
    private readonly FileUploadService _fileUploadService;
    public AdminController(FileUploadService fileUploadService)
    {
        _fileUploadService = fileUploadService;
    }

    /// <summary>
    /// 
    /// </summary>
    /// <returns></returns>
    public IActionResult Index()
    {
        return View();
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="file"></param>
    /// <returns></returns>
    public async Task<RestfulResult> Image(IFormFile file)
    {
        return await _fileUploadService.Image(file);
    }

}
